home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Software Vault: The Gold Collection
/
Software Vault - The Gold Collection (American Databankers) (1993).ISO
/
cdr25
/
view3d.zip
/
MANUAL.DOC
< prev
next >
Wrap
Text File
|
1993-06-07
|
14KB
|
265 lines
=============================================================================
============== 3-D W O R L D F O R O S / 2 2.x =============
=============================================================================
Copyright (C) 1993 by Shuqian Ying
Written By Shuqian Ying
========================= M A N U A L ==============================
Section 1. Model Definition:
There are two ways of defining 3-D images in the present version of
the program.
1.1 Defining the 3-D images through parametric analytic functions
An example is z = f(x,y), f(x,y) = x^2 + y^2, which is one of
the simplest cases. The program however allows you to generate the
3-D data set in a parameter space, such as
x = f(u,v), y = g(u,v), z = h(u,v),
provided that the regions defining the images in the (u,v) parameter
space are rectangular ones of the following form
u_min < u <= u_max, v_min < v <= v_max.
1.2 Defining the 3-D images through ASCII script files
The format of these script files in the current version of the
program is
----------------------------------------------------------------------
id: # | A non-negative integer id number. (0<= id < 30)
----------------------------------------------------------------------
Name: name | A string that labels a particular data set.
----------------------------------------------------------------------
Color: | A string that declares the color of the covering
| surface of the image. The available colors are:
| Blue, DarkBlue, Green, DarkGreen, Red, DarkRed,
| Yellow, Cyan, Pink, DarkPink, White, Black,
| Brown, DarkGray, PaleGray
----------------------------------------------------------------------
nu nv | nu is the number of mesh points on the u-axis
| and nv is the number of mesh points on the v-axis.
----------------------------------------------------------------------
x1 y1 z1 | This set is the 3-D data block. The order of these
x2 y2 z2 | 3-D data points are arranged such that the u
.... | parameter is kept fixed while v run from v_1 to
.... | v_nv, then u changes to its next value and v run
xn yn zn | from v_1 to v_nv again.
----------------------------------------------------------------------
Coordinate | A string that signifies the beginning of the body
| coordinate definition.
----------------------------------------------------------------------
xx0 xy0 xz0 | Two points that define the x_axis. It can be set
xx1 xy1 xz1 | to {0 0 0} and {a 0 0} at the beginning, with "a"
| a number of the same order as the size of the 3-D
| object.
----------------------------------------------------------------------
yx0 yy0 yz0 | Two points that define the y_axis. It can be set
yx1 yy1 yz1 | to {0 0 0} and {0 a 0} at the beginning. "a"
| should be the same as the one for the x_axis.
----------------------------------------------------------------------
zx0 zy0 zz0 | Two points that define the z_axis. It can be set
zx1 zy1 zz1 | to {0 0 0} and {0 0 a} at the beginning. "a"
| should be the same as the one for the x_axis.
----------------------------------------------------------------------
next/end | A string signifies the termination of the data
| set definition. If the string is "next", it also
| signifies the begin of a next one. Otherwise, it
| signifies the end of the definition.
----------------------------------------------------------------------
..... | Repeat the above steps, if a "next" is read, to
..... | define another 3-D object to be plotted on the
..... | same screen.
----------------------------------------------------------------------
1.3 Miscellaneous Information
1.3.1 Use different id for different part of the data set. Also
nu >= 3 and nv >= 3 should be used for the current version
of the program.
1.3.2 This demonstration program will not allow you to input another
data set from a script file before cleaning up (see later part
of this document) the current ones.
1.3.3 In addition, only a few predefined analytical (parametric) 3-D
models are provided for demonstration purposes. If you like to
investigate your own data set, use the script file method by
generating the data file first.
1.3.4 Finally, error checking for file parsing has not been
implemented. So script file with incorrect format will likely
crash the program.
Section 2. Actions
2.1 The viewer's motion:
The motion of the viewer can be simulated by the mouse.
2.1.1 Adjusting open viewing angle
The viewer can adjust his/her open viewing angle to simulate the
effects of a telescope. This mode can be activated in the "Zoom"
sub-menu of the "View" menu. After activating this mode, the viewer
can zoom-in by clicking the mouse button 1 and zoom-out by clicking
mouse button 2. To deactivate the zooming mode, click the mouse
button 3 or the ESC key in case the viewer has a two button mouse or
prefers to do so. In the current version of the program, the
increment and decrement of the view angle for each click of the
mouse button can not be changed by the viewer.
2.1.2 Walking
The viewer can walk forward and backward in his/her focus direc-
tion of viewing. This mode can be activated in the "Action" menu by
clicking on the "Walk Stopped" item. Once the walking mode is
activated, the "Walk Stopped" item is changed to "Walking..."
indicating that the viewer is in walking mode. The viewer walk
forward if he/she clicks the mouse button 1 and walk backward if
he/she clicks the mouse button 2. This mode is deactivated by
clicking the mouse button 3 or pressing the ESC key in case the
viewer has a two button mouse or prefers to do so. In the current
version of the program, the increment or decrement of the viewer's
distance to origin of the world coordinate following each clicking
of the mouse button can not be changed by the viewer.
2.1.3 Shifting focus
The viewer can shift his/her focus (of viewing). The focus point
of the viewer on the screen is assumed to be at the center. To shift
the focus point, activate the shift focus mode in the "Action" menu.
By pointing the mouse pointer to the point of interest and clicking
the mouse button 1, the effects of shifting focus point in the real
lift can be achieved. This mode is automatically deactivated when
the program finishes the shifting focus process.
2.1.4 Simulations of viewer's motion
The viewer can "fly" through and around the 3-D object in real
time. This is a mini virtual reality (VR) mode in which the viewer
can look around at all directions and move to anywhere in the
virtual 3-D space. This mode is activated in the "Action" menu.
After activation of this mode, the viewer moves to the right by
moving the mouse to the right and he/she moves to the left by moving
the mouse to the left. To move upward, the viewer should move the
mouse forward (this is just opposite to the conventional airplane).
Opposite direction of motion is achieved by moving the mouse backward.
The speed of the forward flying is controlled by the frequency of the
mouse button 1 been clicked. The speed of the backward flying speed
is controlled by the frequency of the mouse button 2 been clicked.
This mode is deactivated by pressing the mouse button 3 or the ESC
key in case the viewer has a two button mouse or prefers to do so.
2.2 The manipulation of individual object
The viewer can rotate, displace, scale or delete individual or a
group of 3-D object(s) when it (they) is (are) active. To perform such
transformations, the viewer should first activate the object(s) by
turning on the "Select Models" mode, which can be activated in the "3D
Models" menu, and clicking on object(s) that is (are) not active and is
(are) of interest. (If the object is already active before been clicked,
it turns the object into inactive mode after been clicked.) By
selecting the "Transform" item in "Action" menu, providing the required
parameters and turning on the transformation buttons, the viewer can
achieve the intended transformation(s). The order or the transformations
applied is the same as the one appears on the dialog box.
2.3 Relocation of the viewer
The viewer can change his/her position of viewing from one location
to another. This is achieved in the "Parameters" menu. By providing the
parameters related to the open view angle, the polar angle of the viewer
in the world coordinate system and the distance of the viewer from the
origin of the world coordinate, the viewer can relocate himself/herself
according to the information provided.
Section 3. Displaying the 3-D Images
The 3-D image can be displayed in various forms. In the inactive mode
discussed below, only a wire-frame of the object can be displayed. In the
active mode, there are few options for the viewer that can be chosen to
see different aspects of the object. These options are chosen in the "View"
menu under the item "Options" (a sub-menu). By activate the object(s) the
viewer is interested to observe, various effects can be shown.
To display all images in the current session, the viewer can click
either the "Display All" item in the "3D Models" menu or the "Redraw" item
in the "View" menu. This is useful in case the viewer want to see the
effects of certain operations performed by him/her on the images.
There are also some useful drawing actions under the "Draw" sub-menu of
the "View" menu.
Section 4. Object Modes
An object in the program has two modes. The first one is the inactive
mode in which most of the operations on it have no effects except those
related to the viewer's motion (walk, shift focus, flying and zooming).
The second one is the active mode in which all operations apply to it.
Should you find some operations to be not effective on the object you try
to manipulate, you may have had not make it active. There are
three ways of turning an inactive object active. The first one is click
the "Select Models" item in the "3D Model" menu. After the viewer do that,
a rectangular gray mesh that bound the image appears. Clicking
the mouse button 1 while locating the mouse pointer inside the mesh will
change the mode of the object, namely, a active object is turned into
inactive and vice versa. The second way is to click on the
"Select All" item in the "3D Model" menu. The action turns every
one of the objects on the screen active. As an alternative of the above
two, you can first locate the mouse pointer on the object(s) interested,
double click the mouse button 1. The object under the mouse pointer
changes it mode after that. If you click the mouse button 1 when the
mouse pointer points to the common region of several objects, each one of
them changes its mode.
In the inactive mode, an object has a color of darkblue. Only its wire
frame is displayed.
In the active mode, an object is "brightened" when it is displayed in
the wire frame form. In addition, the hide hidden line and surface opera-
tions can be applied to them. Also, body coordinate of an object can be
displayed.
Section 5. Coordinates
1.) A world coordinate that gives the viewer a sense of direction (but
not the absolute location) can be drawn. It is always located at the
focus of point (on the screen) of the viewer.
2.) A "body coordinate" for each individual objects can be drawn.
3.) A "bounding box" for each individual objects can be drawn with
or without the numerical values of the coordinates be shown. The
numerical value is related to the world coordinates of the object.
The body coordinate can also be shown in the future.
4.) A solid "bounding box" for each individual objects can be drawn with or
without the numerical values of the coordinates be shown.
Section 6. Editing
This part remains to be developed further.
Section 7. Destroy and Cleaning Up
Some or all of the objects created can be destroyed by following the
following procedure. First activate the object(s) that is (are) intended
to be destroyed, and deactivate other object(s) that is to be kept. Clicking
on the "Destroy" item in the "3D Models" menu will deallocate the memory
allocated by the active object(s) and therefore destroy it (them). In case
all of the objects in the present session is not needed, the viewer can
simply click the "Clear All" item in the "3D Models" menu. This action
will free all of the memories allocated for the 3-D images.